<?php
// this check prevents access to debug front controllers that are deployed by accident to production servers.
// feel free to remove this, extend it or make something more sophisticated.
if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1', '172.20.18.133')))
{
  die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
}

if ($_FILES["filedata"]["error"] > 0)
  {
  echo "Error: " . $_FILES["filedata"]["error"] . "<br />";
  }
else
  {
  echo "Upload: " . $_FILES["filedata"]["name"] . "<br />";
  echo "Type: " . $_FILES["filedata"]["type"] . "<br />";
  echo "Size: " . ($_FILES["filedata"]["size"] / 1024) . " Kb<br />";
  echo "Stored in: " . $_FILES["filedata"]["tmp_name"];
  }
?>

<hr />
<form id="form1" action="/test/upload.php" method="post" enctype="multipart/form-data">
  <input type="hidden" name="upload_max_filesize" value="200000" />
  <input type="file" name="filedata" id="filedata" /> <input type="submit" value="Go" />
</form>
<hr />
